package com.luowenbo.shortlink.separation.mapper;

import com.luowenbo.shortlink.separation.entity.UrlMap;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.OffsetDateTime;
import java.util.List;

public interface UrlMapInHotMapper {

    int findColdDataCountInHot(@Param("time")OffsetDateTime time);

    int updateColdFlagInHot(OffsetDateTime time);

    int AtomicUpdateLockThread(@Param("threadName")String threadName, @Param("time")OffsetDateTime time);

    List<UrlMap> getDataByThread(String threadName);

    int deleteColdDataInHotDB(String threadName);

}
